﻿/*** MikeWare Framework ************************************
* This class is part of product of MikeWare.Framework.
* 
* Author      : Mike Cheers
* Mail        : mikecheers@126.com
* Create Date : 2018/9/16
* Summary     : 
* 
* 
* Modified By : 
* Date        : 
* Mail        : 
* Comment     : 
**************************************************************/

namespace MikeWare.Components.MikeLoggor.Listeners
{
    using System;
    using System.Diagnostics;

    public class TraceWriterListener : Listener
    {
        public TraceWriterListener(Loggor loggor, Settings setting)
            : base(loggor, setting) { }

        public override void Write(DateTime logTime, string message)
        {
            Trace.Write(logTime.ToString("HH:mm:ss -> ") + message);
        }

        public override void WriteLine()
        {
            Trace.WriteLine(string.Empty);
        }

        public override void Flush()
        {
            Trace.Flush();
        }

        public override void Rolling() { }

        public override void Close() { }
    }
}
